/**
	@file mult.S
	@author Andrew D. Zonenberg
	@brief Test of the multiplier
 */
 
.set noreorder					/*	Prevent any optimizations from reordering instructions!
									We want exe to exactly match source! */

.section .startup.bootvec, "ax", @progbits 
.globl _start
_start:
		
	li			$t0, 0xDEADBEEF		/* -559,038,737 * -1,163,018,018 = 650,172,123,890,963,266 = 0905E01A : 1761D342  */
	li			$t1, 0xBAADC0DE
	mult		$t0, $t1			/* Multiply them */
	mfhi		$t0
	mflo		$t1
	
	nor			$t0, $t0, $t1		/* Compute bitwise NOR of them, should be E09A0CA5 */
	
	multu		$t0, $t1			/* Multiply again, this time unsigned. E09A0CA5 * 1761D342 = 1483AADA : 7DA8418A */
	
	la			$t0, .printleds
	jalr		$t0
										
.infloop:							/*	Infinite loop
										tests j instruction */
	j			.infloop

.printleds:
	la			$t0, LEDBANKA
	li			$t1, 0xAA
	sw			$t1, 0($t0)
	jr			$ra
